-
-
Notifications
You must be signed in to change notification settings - Fork 2
Integrate rendering v2.0 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… functionality - Implemented integration tests for the ReproducibleFontDownload class, covering scenarios such as creating and loading configurations, modifying cache, and verifying integrity. - Added unit tests for utility functions in the font_download.tools module, including SHA256 computation and FontSource and FontEntity dataclass functionalities. - Ensured comprehensive coverage of edge cases and error recovery scenarios in both integration and unit tests.
… and increase timeout
| "pixel_renderer", | ||
| "font_configurator", | ||
| ] | ||
| testpaths = ["tests", "pixel_renderer", "font_configurator", "font_download"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate line for each
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why, but VSCode won't let me do this...
| downloader = ReproducibleFontDownload() | ||
|
|
||
| # save config | ||
| config_path = downloader.save_config(sources=list_font_sources, config_name="my_fonts") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are the sources mentioned here and not at the object instantiation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be:
downloader = ReproducibleFontDownloader(sources=list_font_sources)
# save config
config_path = downloader.save_config(config_name="my_fonts")There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yesterday I updated README.md - https://github.com/sign/pixel-renderer/blob/ebcb90af7938a702ef56a983c1cda677cc39827c/font_download/README.md
I chose this design to treat the class as a stateless font cache manager. By passing sources directly to methods, a single instance can be reused to save one config, load another, and list all available configs. Tying the instance to a specific source list in the constructor would limit this flexibility and make methods like from_config less intuitive.
| downloader = ReproducibleFontDownload() | ||
|
|
||
| # save config | ||
| config_path = downloader.save_config(sources=list_font_sources, config_name="my_fonts") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be:
downloader = ReproducibleFontDownloader(sources=list_font_sources)
# save config
config_path = downloader.save_config(config_name="my_fonts")
Summary
It's updated version for sign/WeLT#26
Breaking change
dpiparameter